package com.jinlejia.bbs.http.utils;

import com.jinlejia.bbs.BuildConfig;
import com.jinlejia.erp.base.ApiConfig;

/**
 * @author 王进 on 2019/3/22.
 */

public final class BBSConfig {
    //DEBUG 地址 BBS单独使用，在上线时，需要也进行修改
//    private static String IP = "http://192.168.5.28:6201/";
    private static String IP = "https://apilearning.jinlejia.com/";
    private static String MAGEHEADER_URL = ApiConfig.MAGEHEADER_URL();
    private static String HEADER_URL = ApiConfig.HEADER_URL();

    /**首页-话题列表*/
    public static final String listHomeTopic = IP.concat("topic/listHomeTopic");

    /**推荐厉害的人*/
    public static final String listRecommendUser = IP.concat("user/listRecommendUser");

    /**贡献月榜*/
    public static final String listRencountByMonth = IP.concat("rencount/listRencountByMonth");

    /**提问话题*/
    public static final String saveTopic = IP.concat("topic/saveTopic");

    /**个人中心*/
    public static final String minePage = IP.concat("user/getHomePage");

    /**我的邀请回答列表*/
    public static final String listInviterecordByBepin = IP.concat("inviterecord/listInviterecordByBepin");

    /**首页-关注列表*/
    public static final String listAttention = IP.concat("attention/listAttention");
    /**消息类型数量*/
    public static final String countMessageByType = IP.concat("message/countMessageByType");
    /**热门话题列表*/
    public static final String listHotTopic = IP.concat("topic/listHotTopic");
    /**我的 收藏*/
    public static final String listCollection = IP.concat("collection/listCollection");
    /**我的 提问 列表*/
    public static final String listMyTopic = IP.concat("topic/listMyTopic");
    /**我的 关注*/
    public static final String listAttentionUser = IP.concat("attention/listAttentionUser");
    /**我的 粉丝*/
    public static final String listAttentionedUser = IP.concat("attention/listAttentionedUser");
    /**我的 回答*/
    public static final String listMyAnswerTopic = IP.concat("topic/listMyAnswerTopic");
    /**消息列表 */
    public static final String listRemind = IP.concat("message/listRemind");
    /**话题详情-回答列表*/
    public static final String getTopicDetail = IP.concat("topic/getTopicAnswerDetail");
    /**点赞/取消点赞*/
    public static final String updateAttitudesRecords = IP.concat("attitudesRecords/updateAttitudesRecords");
    /**更新用户的标签*/
    public static final String updateUserTags = IP.concat("user/updateUser");
    /**查询用户的信息*/
    public static final String getUser = IP.concat("user/getUser");
    /**查询热门搜索词*/
    public static final String listSearchRecord = IP.concat("searchRecordRest/ListSearchRecord");
    /**根据 标签 查询用户*/
    public static final String listUserByTagName = IP.concat("user/listUserByTagName");
    /**收藏/取消收藏*/
    public static final String takeCollection = IP.concat("collection/takeCollection/topicCode/");
    /**话题浏览次数加一*/
    public static final String saveTopicReview = IP.concat("topicreview/saveTopicReview");
    /**话题回答*/
    public static final String saveAnswer = IP.concat("answer/saveAnswer");
    /**添加关注/取消关注*/
    public static final String takeAttention = IP.concat("attention/takeAttention/pin/");
    /**忽略 邀请回答*/
    public static final String updateInviterecordState = IP.concat("inviterecord/updateInviterecordState");
    /**评价*/
    public static final String saveComments = IP.concat("comments/saveComments");

    /**某个回答的评价列表*/
    public static final String listCommentsByAnswer = IP.concat("comments/listCommentsByAnswerCode");

    /**首页轮播*/
    public static final String adList = "https://api.fangwifi.com/".concat("6054/advert/getAd?position=56");
    /**上传音频文件*/
    public static final String uploadFile = IP.concat("upload/uploadFile");

    /**邀请回答*/
    public static final String saveInviterecord = IP.concat("inviterecord/saveInviterecord");
    /**获取标签集合数据字典*/
    public static final String getTagDict = IP.concat("user/getTagDict");
    /**消息-邀请回答忽略*/
    public static final String updateReadStateById = IP.concat("message/updateReadStateById/");

    public static String headerUrl(String url){
        if (BuildConfig.DEBUG){
            return MAGEHEADER_URL+url;
        }
        return MAGEHEADER_URL+url;
    }
    /**删除评论*/
    public static final String delComments = IP.concat("comments/delComments");
    /**删除话题*/
    public static final String delTopic = IP.concat("topic/delTopic");
    /**删除回答*/
    public static final String delAnswer = IP.concat("answer/delAnswer");
    public static String bannerUrl(String url){
        return MAGEHEADER_URL + url;
    }

    public static String mp3(String url) {
        return MAGEHEADER_URL+url;
    }
}
